package com.example.administrator.myapplication.set;

import android.app.Fragment;
import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.graphics.Color;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.Toolbar;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.example.administrator.myapplication.R;
import com.example.administrator.myapplication.set.about.AboutMainFragment;

/**
 * Created by Administrator on 2018/1/14.
 */

public class UserinfoFragment extends Fragment {
    private Toolbar toolbar;
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
        View view =inflater.inflate(R.layout.fragment_set_userinfo,container,false);
        toolbar = (Toolbar) getActivity().findViewById(R.id.toobar_set);
        toolbar.setNavigationIcon(R.mipmap.custom_back);
        toolbar.setTitle("个人资料");
        toolbar.setTitleMarginStart(35);
        toolbar.setTitleTextColor(Color.parseColor("#ffffff"));
        toolbar.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                SetMainFragment fragment =new SetMainFragment();
                FragmentManager fm =getActivity().getFragmentManager();
                FragmentTransaction ft =fm.beginTransaction();
                ft.replace(R.id.fragment_setmain,fragment).commit();
            }
        });
        return view;
    }
}
